package com.cloud.model;

import java.util.Date;

import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import com.cloud.model.evnt.UserEvent;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 
 * 用户touken
 * 
 * @author jaddy0302 Rivulet User.java 2010-3-17
 * 
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Document
public class UserToken implements UserEvent, java.io.Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	/**
	 * 
	 */
	@Id
	private String id;

	private String token; // token
	private String userid; // user id

	private Date exptime; // 过期时间

	private String client; // 终端类型 ， IOS/ANDROID/H5/OTHER

	private String ip;

	private String region;

	private String orgi;
	private String creater;
	private Date createtime = new Date();
	private Date updatetime = new Date();
	private Date passupdatetime = new Date();

	private Date lastlogintime = new Date(); // 最后登录时间

}
